<?php
/**
 * Created by PhpStorm.
 * User: osxfal
 * Date: 2019/1/1
 * Time: 上午1:16
 */

namespace App\HttpController;
use EasySwoole\Http\AbstractInterface\Controller;
use http\Env\Request;

class Index extends Controller
//class Index
{

    private $_postData = NULL;

    function __initialize($request)
//    function __construct($request)
    {
        $this->_postData = $request->getRequestParam();   //getRequestParam  是 $request 中的一个成员对象.专门承载get,post,request 参数
    }

    public function index(){

        $str = 'hello world!!..  I\'m falcon';
        return $str;

    }//

    public function fuck(){

        $str = "I'm a hacker" . $this->_postData['name'].  "You are ".$this->_postData['status']."!!";
        return $str;

//        $this->response()->write('I\'m a hacker falcon!!  .  You are suck!!');
    }
}